<template>
	<u-modal :show-confirm-button="false" v-model="show" title="您还未登录">
		<view style="text-align: center;">
			<view style="font-size: 24rpx; color: #666;padding: 20rpx; 0">请先登录之后再进行操作</view>
			<image style="width: 200rpx; height: 200rpx;margin-bottom: 20rpx;" src="../static/img/login-tip.jpg" mode="aspectFit"></image>
			<view class="m-btn-ul">
				<view class="m-btn-li" @click="cancel">暂不登录</view>
				<view class="m-btn-li confirm-btn primary-bg">
					<Login @loginSuccess="loginSuccess"><view slot="lBtn" style="color: #fff;margin-top: 6rpx;">立即登录</view></Login>
				</view>
			</view>
		</view>
	</u-modal>
</template>

<script>
import Login from './Login.vue';
export default {
	components: {
		Login
	},
	props: {
		show: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return{}
	},
	methods: {
		loginSuccess() {
			this.cancel();
		},
		confirm() {
			// #ifdef APP-PLUS || H5
			uni.reLaunch({
				url: '/pages/public/wxLogin'
			});
			// #endif
			// #ifdef MP-WEIXIN || MP-TOUTIAO
			uni.reLaunch({
				url: '/pages/binding/bindInfo'
			});
			//#endif
		},
		cancel() {
			console.log(123)
			this.$emit('cancel');
		}
	}
};
</script>

<style lang="scss">
.m-btn-ul {
	display: flex;
	border-top: 1px solid #f4f4f4;
	.m-btn-li {
		flex: 2;
		font-size: 28upx;
		line-height: 88upx;
	}
	.confirm-btn {
		color: #ffffff;
		background-color: $uni-color-primary;
	}
}
</style>
